package com.example.android.kotlin

fun main() {
//    var animal = mapOf(
//        "cat" to "🐱",
//        "dog" to "🐶",
//        "pig" to "🐷",
//        "cow" to "🐮",
//        "sheep" to "🐑",
//        "goat" to "🐐",
//    )
//    println("sheep")
//    println(animal["dog"])
    var animal = mutableMapOf(
        "cat" to "🐱",
        "dog" to "🐶",
        "pig" to "🐷",
        "cow" to "🐮",
        "sheep" to "🐑",
        "goat" to "🐐"
    )
    println(animal["goat"])
    //修改
    animal["goat"] = "🐬"
    println(animal["goat"])
    //添加
    animal["horse"] = "🐴"
    println(animal["horse"])
    //删除
    animal.remove("pig")
}